#include <iostream>
#include <signal.h>
#include <string>
using namespace std;


int main(int argc,char* argv[])
{
    if(argc != 3)
    {
        cout << "./mykill pid sig" << endl;
        exit(1);
    }
    
    pid_t target = stoi(argv[1]);
    int sig = stoi(argv[2]);
    int n = kill(target, sig);
    if(n == 0)
    {
        cout << "发送了: " + sig << "信号给: " + target << endl;
    }

    return 0;
}